package sraft

type ExternalEventType uint8

const (
	// The most frequent event
	// each time leader broadcasts this event to achieve Raft cluster consistency.
	DataSyncEvent ExternalEventType = iota

	// if have new node to join the Raft cluster.
	// Leader will receive this event.
	RegisterNodeEvent

	// if leader has been silent state.
	// node will broadcasts this event to Raft cluster.
	VoteForItEvent

	// when the node become leader.
	// node will broadcasts this event to Raft cluster.
	NewLeaderEvent
)

type InternelEventType uint8

const (
	// After the `DataSyncEvent` is complete.
	// if new data update log is found.
	// will append new data update log to LogSynchronizer.
	LogAppendEvent InternelEventType = iota
)
